You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uuid: the desired descriptor UUID, expressed as a character array or a
BLEUUID object
Returns
The function returns the found descriptor as a BLERemoteDescriptor
object pointer, otherwise nullptr is returned if a descriptor with the
UUID is not found.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::getUUID
Description
Get the characteristic UUID.
Syntax
BLEUUID getUUID();
Parameters
The function requires no input parameter.
Returns
The function returns the characteristic UUID as a BLEUUID class
object.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::setBufferLen
Description
Set the size of the internal data buffer of the characteristic.
Syntax
void setBufferLen(uint16_t max_len);
Parameters
max_len: number of bytes to resize the internal buffer to.
Returns
The function returns nothing.
Example Code
Example: BLEUartClient
Notes and Warnings
Characteristic data buffer has a default size of 20 bytes and can be
increased up to 230 bytes.
BLERemoteCharacteristic::getBufferLen
Description
Get the size of the characteristic internal buffer.
Syntax
uint16_t getBufferLen();
Parameters
The function requires no input parameter.
Returns
The function returns the currently set internal buffer size.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::canRead
Description
Determine if characteristic has read property enabled.
Syntax
bool canRead();
Parameters
The function requires no input parameter.
Returns
The function returns TRUE if the read property for the characteristic
is enabled.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::canWrite
Description
Determine if characteristic has write property enabled.
Syntax
bool canWrite();
Parameters
The function requires no input parameter.
Returns
The function returns TRUE if the write property for the characteristic
is enabled.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::canNotify
Description
Determine if characteristic has notify property enabled.
Syntax
bool canNotify();
Parameters
The function requires no input parameter.
Returns
The function returns TRUE if the notify property for the
characteristic is enabled.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::canIndicate
Description
Determine if characteristic has indicate property enabled.
Syntax
bool canIndicate();
Parameters
The function requires no input parameter.
Returns
The function returns TRUE if the indicate property for the
characteristic is enabled.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::getProperties
Description
Get the characteristic properties.
Syntax
uint16_t getProperties();
Parameters
The function requires no input parameter.
Returns
The function returns the characteristic properties.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::readString
Description
Request for characteristic data from the remote device and read the
data in the buffer, expressed as a String class object.
Syntax
String readString();
Parameters
The function requires no input parameter.
Returns
The function returns the data in the characteristic buffer expressed
as a String class object.
Example Code
Example: BLEUartClient
Notes and Warnings
NA
BLERemoteCharacteristic::readData8
Description
Request for characteristic data from the remote device and read the
data in the buffer, expressed as an unsigned 8-bit integer.
Syntax
uint8_t readData8();
Parameters
The function requires no input parameter.
Returns
The function returns the data in the characteristic buffer expressed
as a uint8_t value.
Example Code
Example: BLEBatteryClient
Notes and Warnings
NA
BLERemoteCharacteristic::readData16
Description
Request for characteristic data from the remote device and read the
data in the buffer, expressed as an unsigned 16-bit integer.
Syntax
uint16_t readData16();
Parameters
The function requires no input parameter.
Returns
The function returns the data in the characteristic buffer expressed
as a uint16_t value.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::readData32
Description
Request for characteristic data from the remote device and read the
data in the buffer, expressed as an unsigned 32-bit integer.
Syntax
uint32_t readData32();
Parameters
The function requires no input parameter.
Returns
The function returns the data in the characteristic buffer expressed
as a uint32_t value.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::writeString
Description
Write data to the remote device characteristic as a String object or
character array.
Syntax
bool writeString(String str);
bool writeString(const char* str);
Parameters
str: the data to write to the remote characteristic, expressed as a
String class object or a char array.
Returns
The function returns TRUE if write data is successful.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::writeData8
Description
Write data to the remote device characteristic as an unsigned 8-bit
integer.
Syntax
bool writeData8(uint8_t num);
Parameters
num: the data to write to the characteristic buffer expressed as an
unsigned 8-bit integer.
Returns
The function returns TRUE if write data is successful.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::writeData16
Description
Write data to the remote device characteristic as an unsigned 16-bit
integer.
Syntax
bool writeData16(uint16_t num);
Parameters
num: the data to write to the characteristic buffer expressed as an
unsigned 16-bit integer.
Returns
The function returns TRUE if write data is successful.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::writeData32
Description
Write data to the remote device characteristic as a 32-bit integer.
Syntax
bool writeData32(uint32_t num);
bool writeData32(int num);
Parameters
num: the data to write to the characteristic buffer expressed as a
32-bit integer.
Returns
The function returns TRUE if write data is successful.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::setData
Description
Write data to the remote device characteristic.
Syntax
bool setData(uint8_t* data, uint16_t datalen);
Parameters
data: pointer to byte array containing desired data
datalen: number of bytes of data to write
Returns
The function returns TRUE if write data is successful.
Example Code
NA
Notes and Warnings
NA
BLERemoteCharacteristic::getData
Description
Request for characteristic data from the remote device and read the
data in the buffer.